/*
 * Action.h
 *
 *  Created on: 19.07.2009
 *      Author: h3llfire
 */

#ifndef ACTION_H_
#define ACTION_H_

#include <wx/object.h>
#include <map>
#include "../Actions.h"
#include "../Buddy.h"

namespace Impp{

class Action : wxObject{

	DECLARE_ABSTRACT_CLASS(Action);

protected:
	ActionId id;
	Buddy* buddy;
	time_t expireTime;
	int locks;
	bool deleted;
public:
	std::map<wxString, int> dataInt;

public:
	Action(Buddy* buddy, time_t timeToLife);
	~Action();

	virtual wxString getDescription() = 0;
	virtual wxString getFullDescription() = 0;
	virtual bool isTimedOut();
	virtual Buddy* getBuddy();

	void setId(const ActionId & id);
	ActionId getId();
	void deleteAction();
	bool isDeleted();
	void lock();
	void unLock();
	bool isLocked();

};

}

#endif /* ACTION_H_ */
